{extend name='main'}

{block name="button"}
<!--{if auth("remove")}-->
<a data-confirm="确定要删除这些问题反馈吗？" data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" class='layui-btn layui-btn-sm layui-btn-primary'>删除问题反馈</a>
<!--{/if}-->
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white table-block">
    <div class="layui-tab-content think-box-shadow table-block table-block">
<!--        {include file='index/index_search'}-->
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
<!--                <th class='list-table-sort-td'>-->
<!--                    <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>-->
<!--                </th>-->
                <th class='text-left nowrap'>姓名</th>
                <th class='text-left nowrap'>问题类型</th>
                <th class='text-left nowrap'>问题级别</th>
                <th class='text-left nowrap'>是否重现</th>
                <th class='text-left nowrap'>问题描述</th>
                <th class='text-left nowrap'>图片或视频</th>
                <th class='text-left nowrap'>问题状态</th>
                <!--{if auth("edit")}-->
                <th>操作</th>
                <!--{/if}-->
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr data-dbclick>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
                </td>
                <td class="nowrap">{$vo.username} ({$vo.user_id})</td>
                <td class="nowrap">{$feed_types[$vo.feed_type]}</td>
                <td class="nowrap">{$ranks[$vo.rank]}</td>
                <td class="nowrap">{$replys[$vo.is_reply]}，{$vo.replay_summary}</td>
                <td class="nowrap" title="{$vo.contents}">{$vo.short|default=''}</td>
                <td class="nowrap">{$vo.files|raw}</td>
                <td class="nowrap">{$status_arr[$vo.status]}</td>
                <!--{if auth("edit")}-->
                <td class='text-left nowrap'>

                    <!--{if auth("edit")}-->
                    {if $vo.status<2}
                    <a class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>回复</a>
                    {/if}
                    {if $vo.status==2}
                    <a class="layui-btn layui-btn-sm" deta-area="['800px','600px']" data-title="查看" data-modal='{:url("edit")}?id={$vo.id}' data-value="id#{$vo.id}">查看</a>
                    {/if}
                    <!--{/if}-->

                    <!--{if auth("state")}-->
                    {if $vo.status==1}
                    <a class="layui-btn layui-btn-sm" data-title="已解决" data-action='{:url("state")}' data-value="id#{$vo.id};status#2">已解决</a>
                    {/if}
                    {if $vo.status==0}
                    <a class="layui-btn layui-btn-sm" data-title="解决中" data-action='{:url("state")}' data-value="id#{$vo.id};status#1">解决中</a>
                    {/if}
                    <!--{/if}-->

                    <!--{if auth("remove")}-->
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除此问题反馈吗？" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                    <!--{/if}-->
                </td>
                <!--{/if}-->
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>
{/block}

{block name='script'}
<script>
    (function () {
        $('.video').click(function () {
            let url = $(this).data("url");
            layer.open({
                type: 1,
                title: '查看视频',
                area: '300px',
                offset: 'auto',
                content: '<video style="width: 300px; height: auto;" controls="controls" autobuffer="autobuffer" autoplay="autoplay" loop="loop"><source src="'+ url +'" type="video/mp4"></source></video>',
            });
        })
        layui.form.render();
    })();
</script>
{/block}
